package com.dzsw.test.mybatisp.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import java.io.Serializable;
import java.util.Map;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author admin
 * @since 2020-08-20
 */
@TableName(value = "t_user", autoResultMap = true)
public class TUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId("Id")
    private Long id;

    /**
     * 姓名
     */
    @TableField("Name")
    private String name;

    /**
     * 性别
     */
    @TableField("Sex")
    private Integer sex;

    /**
     * 课程
     */
    @TableField(value = "Courses", typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> courses;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public Map<String, Object> getCourses() {
        return courses;
    }

    public void setCourses(Map<String, Object> courses) {
        this.courses = courses;
    }

    @Override
    public String toString() {
        return "TUser{" +
            "id=" + id +
            ", name=" + name +
            ", sex=" + sex +
            ", courses=" + courses +
        "}";
    }
}
